import React, { useContext } from 'react'
import MyContext from './MyContext'

export default function ContextD() {
  const theme = useContext(MyContext)
  return (
    <div>
      <div>ContextD</div>
      <div>{theme.num}</div>
      <button onClick={() => theme.setNum(theme.num + 1)}>+1</button>
    </div>
  )
}
